//Forzando Commit
package es.ceura.tfg.connection;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;


public class ConnectorMySQL {
	
	public ConnectorMySQL(){}
	
	public static java.sql.Connection connect(){
		
		java.sql.Connection connection = null;
		try{
		InitialContext initialContext = new InitialContext();
		Context envContext = (Context) initialContext.lookup("java:/comp/env");
		DataSource data = (DataSource) envContext.lookup("jdbc/test_jpm");
		connection = data.getConnection();
		} catch (Exception e){}
		
		return connection;
	}

}
